package com.fwmagic.spark.core

import org.apache.spark.sql.{DataFrame, SparkSession}

object ReadOrc {
  def main(args: Array[String]): Unit = {
    val spark = SparkSession.builder()
      .appName("loadOrcFile")
      .master("local")
      .getOrCreate()

    val df: DataFrame = spark.read.option("header",true).orc("data/location.orc")

    df.printSchema()

    df.show(100,false)

    //df.show()

//    result.collect().foreach(println)

    spark.close()

  }

}
